package org.sith.taskrunner.engine;


import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertiesHolder {

    private static final PropertiesHolder propertiesHolder = new PropertiesHolder();

    private final Properties properties;

    private PropertiesHolder() {
        this.properties = new Properties();

        try {
            properties.load(new FileInputStream("engine.properties"));

        } catch (IOException e) {
            throw new IllegalStateException(e);
        }

    }


    public static PropertiesHolder getInstance() {
        return propertiesHolder;
    }

    public String getProperty(String key) {
        return properties.getProperty(key);
    }


}
